﻿@model Web.ViewModels.NewsContentModel

<div id="news_content_container" class="@(String.IsNullOrEmpty(Model.Content) ? "ownerOnly" : "")">
		
	<div class="editContentText_field" id="contentContainer">
        <span class="editContentText_field editContentText_field0"> 
            @Model.Content
        </span>
        <span class="editContentText_dummy0" @if (!String.IsNullOrEmpty(Model.Content))
                                        {
                                                @:style="display: none;"
                                        }>
            Щёлкните сюда, чтобы заполнить текст новости
        </span>
        <br/>
        <div style="height:20px;">
		<a href="#" class="editButton_edit editButton" rel="editContentText">Редактировать</a>
        </div>
    </div>
	@using (Html.BeginForm("ChangeContent", "News", FormMethod.Post, new { @class = "ajaxForm_noReload", @name = "editContentText_form" }))
 {
		<input type="hidden" name="id" value="@(Model.id)"/>
		<div class="editionInput editContentText_input">
			@Html.TextAreaFor(x => x.Content, new
									{
										@id = "editContentText_input",
                                        @class = "editContentText_input0",
										@placeholder = "8 сентября в 12:00 в парке Энгельса состоится субботник"
									})
			@Html.ValidationMessageFor(x => x.Content)
		</div>

		<input type="submit" class="editButton_submit editionInput editContentText_input" value="Сохранить" name="editContentText" />
		<input type="reset" class="editButton_cancel editionInput editContentText_input" value="Отмена" name="editContentText" />
 }
</div>

